package com.terrier.ui.skins.defaults
{
    import com.terrier.ui.skins.IWxCheckButtonSkin;
    import com.terrier.ui.skins.skinBaseClasses.WxTabBarSkinBase;

    /**
     * TabBar的默认皮肤
     * @author Jarvis.weng
     */
    public class WxTabBarSkinDefault extends WxTabBarSkinBase
    {
        protected var _tabNum:int;

        protected var _direction:String;

        public function WxTabBarSkinDefault()
        {
            super();
        }

        override public function setTabInfo(tabNum:int, direction:String):void
        {
            _tabNum = tabNum;
            _direction = direction;
        }

        override public function getTabSkin(index:int):IWxCheckButtonSkin
        {
			return new TabButtonSkin();
        }
    }
}
import com.terrier.ui.skins.WxAssetUtility;
import com.terrier.ui.skins.skinBaseClasses.WxCheckButtonSkinBase;

import flash.display.Sprite;

class TabButtonSkin extends WxCheckButtonSkinBase
{
	public function TabButtonSkin()
	{
		_upBg = new TabBar_upSkin();
		_overBg = new TabBar_overSkin();
		_downBg = new TabBar_downSkin();
		_disabledBg = new TabBar_disabledSkin();
		
		_selectedUpBg = new TabBar_downSkin();
		_selectedOverBg = new TabBar_downSkin();
		_selectedDownBg = new TabBar_downSkin();
		_selectedDisabledBg = new TabBar_disabledSkin();
		
		var asset:Sprite = new LabelButton_textStyle();
		
		_upTxtStyle = WxAssetUtility.getTextStyle(asset, 3);
		_overTxtStyle = WxAssetUtility.getTextStyle(asset, 2);
		_downTxtStyle = WxAssetUtility.getTextStyle(asset, 1);
		_disabledTxtStyle = WxAssetUtility.getTextStyle(asset, 0);
		
		_selectedUpTxtStyle = WxAssetUtility.getTextStyle(asset, 1);
		_selectedOverTxtStyle = WxAssetUtility.getTextStyle(asset, 1);
		_selectedDownTxtStyle = WxAssetUtility.getTextStyle(asset, 1);
		_selectedDisabledTxtStyle = WxAssetUtility.getTextStyle(asset, 0);
	}
}
